home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 8599 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  737 b 

  1. Path: nntp.teleport.com!usenet
  2. From: GHouck <hksys@teleport.com>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Convert String to Int?
  5. Date: 5 Mar 1996 10:34:49 GMT
  6. Organization: systems hk
  7. Message-ID: <4hh5c9$iia@nadine.teleport.com>
  8. References: <4hf3sk$k57@hustle.rahul.net>
  9. NNTP-Posting-Host: ip-pdx03-48.teleport.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 1.22 (Windows; I; 32bit)
  14.  
  15. Stephen Parry <sparry@rahul.net> wrote:
  16. >I have some numbers, range 0 to 999, stored as a strings. I need to 
  17. >convert them to integers. Could I get some hints how to do this?
  18. >
  19. >Stephen
  20. Stephen,
  21. One way is to use the function 'atoi()'; i.e.,  intVal = atoi( strVal );
  22. Yours, Geoff Houck
  23.  
  24.